import {
  sourceFormat,
  watermarkFormat,
  lenTypeFormat,
  bizTypeFormat,
  audioStatusFormat,
  inStockStatusFormat
} from '../../../../mixin/MixinContants'
export const defaultColums = [
  {
    label: '序号',
    prop: 'id',
    align: 'center'
  },
  {
    label: '媒体名称',
    prop: 'title',
    align: 'center'
  },
  {
    label: '时长',
    prop: 'duration',
    align: 'center',
    formatter(row, column, cellValue, index) {
      return `<div>${row.duration} s</div>`
    }
  },
  {
    label: '一级分类',
    prop: 'cateOneText',
    align: 'center'
  },
  {
    label: '二级分类',
    prop: 'cateTwoText',
    align: 'center'
  },
  {
    label: '关键字',
    prop: 'keywords',
    align: 'center'
  },
  {
    label: '入库时间',
    prop: 'addTime',
    align: 'center'
  },
  {
    label: '来源',
    prop: 'source',
    align: 'center',
    render: (h, row) => {
      return (<span>{sourceFormat.data[row.source].value}</span>)
    }
  },
  {
    label: '水印状态',
    prop: 'maskStatus',
    align: 'center',
    render: (h, row) => {
      return (<span>{watermarkFormat.data[row.maskStatus].value}</span>)
    }
  },
  {
    label: '节目分类',
    prop: 'lenType',
    align: 'center',
    render: (h, row) => {
      return (<span>{lenTypeFormat.data[row.lenType].value}</span>)
    }
  },
  {
    label: '发布人',
    prop: 'bizType',
    align: 'center',
    render: (h, row) => {
      return (<span>{bizTypeFormat.data[row.bizType].value}</span>)
    }
  }

]
// 合辑详情表格
export const collectColums = [
  {
    label: 'ID',
    prop: 'id',
    align: 'center'
  },
  {
    label: '合辑信息',
    prop: 'colNo',
    align: 'center'
  },
  {
    label: '素材封面',
    prop: 'posterUrl',
    align: 'center',
    render: (h, row) => {
      return (
        <div style={{ width: '90%', height: '90%' }}>
          <img src={row.posterUrl} style={{ width: '100%', height: '100%' }}/>
        </div>
      )
    }
  },
  {
    label: '素材名称',
    prop: 'title',
    align: 'center'
  },
  {
    label: '一级标签',
    prop: 'cateOneText',
    align: 'center'
  },
  {
    label: '二级标签',
    prop: 'cateTwoText',
    align: 'center'
  },
  {
    label: '关键字',
    prop: 'keywords',
    align: 'center'
  },
  {
    label: '视频时长',
    prop: 'length',
    align: 'center',
    formatter(row, column, cellValue, index) {
      return `<div>${row['length']} s</div>`
    }
  },
  {
    label: '审核状态',
    prop: 'auditStatus',
    align: 'center',
    render: (h, row) => {
      return (<span>{audioStatusFormat.data[row.auditStatus].value}</span>)
    }
  },
  {
    label: '入库状态',
    prop: 'inStock',
    align: 'center',
    render: (h, row) => {
      return (<span>{inStockStatusFormat.data[row.inStock].value}</span>)
    }
  },
  {
    label: '节目分类',
    prop: 'lenType',
    align: 'center',
    render: (h, row) => {
      return (<span>{lenTypeFormat.data[row.lenType].value}</span>)
    }
  },
  {
    label: '创建时间',
    prop: 'addTime',
    align: 'center'
  }

]
